
package com.jf.cloud.auth.dto;

import io.swagger.v3.oas.annotations.media.Schema;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 用于登陆传递账号密码
 *
 * @author zz
 * @date 2020/7/1
 */
public class AuthenticationDTO {

    /**
     * 用户名
     */
    @NotBlank(message = "userName不能为空")
    @Schema(description = "用户名/邮箱/手机号" , required = true)
    protected String userName;

    /**
     * 密码
     */
    @NotBlank(message = "passWord不能为空")
    @Schema(description = "一般用作密码" , required = true)
    protected String passWord;

    /**
     * sysType 参考SysTypeEnum
     */
    @NotNull(message = "sysType不能为空")
    @Schema(description = "系统类型 0.普通用户系统 1.商家端" , required = true)
    protected Integer sysType;

    @Schema(description = "零时的uid，微信公众号支付需要openid，但用户又不绑定社交账号，所以这个openId是临时的" )
    protected String tempUid;

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassWord() {
        return passWord;
    }

    public void setPassWord(String passWord) {
        this.passWord = passWord;
    }

    public Integer getSysType() {
        return sysType;
    }

    public void setSysType(Integer sysType) {
        this.sysType = sysType;
    }

    public String getTempUid() {
        return tempUid;
    }

    public void setTempUid(String tempUid) {
        this.tempUid = tempUid;
    }

    @Override
    public String toString() {
        return "AuthenticationDTO{" +
                "principal='" + userName + '\'' +
                ", credentials='" + passWord + '\'' +
                ", sysType=" + sysType +
                '}';
    }
}
